javascript
What Are Arrays?
An array is a special variable that can hold multiple values in a single variable.
const fruits = ["Apple", "Banana", "Mango"];
Accessing Items:
console.log(fruits[0]); // Output: Apple
console.log(fruits[1]); // Output: Banana
Common Array Methods:
| Method       | Description                     |
|  | - |
| `push()`     | Add item to the end             |
| `pop()`      | Remove item from the end        |
| `shift()`    | Remove item from the beginning  |
| `unshift()`  | Add item to the beginning       |
| `length`     | Get the number of items         |
| `indexOf()`  | Find the index of an item       |
| `includes()` | Check if item exists            |
| `join()`     | Convert to string               |
| `forEach()`  | Run a function on each item     |
| `map()`      | Create new array from each item |
Example:
const numbers = [1, 2, 3, 4];
numbers.push(5);       // [1, 2, 3, 4, 5]
numbers.pop();         // [1, 2, 3, 4]
console.log(numbers.length); // 4
 
                  What Are Objects?
An object is a collection of key-value pairs used to store related data and functions.
Syntax:
const person = {
  name: "John",
  age: 25,
  isStudent: true
};
Accessing Object Properties:
console.log(person.name);        // John
console.log(person["age"]);      // 25
Adding & Updating Properties:
person.city = "New York";        // Add new property
person.age = 26;    
                  Array of Objects Often used in real-world applications (e.g., API responses):
An object is a collection of key-value pairs used to store related data and functions.
const users = [
  { name: "Alice", age: 22 },
  { name: "Bob", age: 25 },
  { name: "Charlie", age: 28 }
];
users.forEach(user => {
  console.log(user.name + " is " + user.age + " years old");
});